﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


public abstract class Creator
{
    public abstract Plant FactoryMethod();
    public abstract Plant FactoryMethod(string name, int price, Rose.FlowerColour colour, Rose.RoseSize budSize);
    public abstract Plant FactoryMethod(string name, int price, int branchCount);
    public abstract Plant FactoryMethod(string name, int price, Lilie.FlowerColour colour, Lilie.LilieSort sort);//ф
}

class RoseCreator : Creator
{
    public override Plant FactoryMethod()
    {
        return new Rose();
    }

    public override Plant FactoryMethod(string name, int price, Rose.FlowerColour colour, Rose.RoseSize budSize)
    {
        return new Rose(name, price, colour, budSize);
    }

    public override Plant FactoryMethod(string name, int price, int branchCount)
    {
        return null;
    }

    public override Plant FactoryMethod(string name, int price, Lilie.FlowerColour colour, Lilie.LilieSort sort)
    {
        return null;
    }
}

class LilieCreator : Creator
{
    public override Plant FactoryMethod()
    {
        return new Lilie();
    }

    public override Plant FactoryMethod(string name, int price, Lilie.FlowerColour colour, Lilie.LilieSort sort)
    {
        return new Lilie(name, price, colour, sort);
    }

    public override Plant FactoryMethod(string name, int price, Rose.FlowerColour colour, Rose.RoseSize budSize)
    {
        return null;
    }

    public override Plant FactoryMethod(string name, int price, int branchCount)
    {
        return null;
    }
}

class HerbCreator : Creator
{
    public override Plant FactoryMethod()
    {
        return new Lilie();
    }

    public override Plant FactoryMethod(string name, int price, int branchCount)
    {
        return new Herb(name, price, branchCount);
    }

    public override Plant FactoryMethod(string name, int price, Rose.FlowerColour colour, Rose.RoseSize budSize)
    {
        return null;
    }

    public override Plant FactoryMethod(string name, int price, Lilie.FlowerColour colour, Lilie.LilieSort sort)
    {
        return true;
    }
}
